Skip to content

Add architecture drift ratchets#174

Merged
bglusman merged 2 commits into
mainfrom
codex/architecture-ratchets-stacked
May 12, 2026
Merged

Add architecture drift ratchets#174
bglusman merged 2 commits into
mainfrom
codex/architecture-ratchets-stacked

Conversation

@bglusman

@bglusman bglusman commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an architecture ratchet script that pins current oversized Rust module budgets and reports watched drift patterns
  • wire the ratchet into CI docs checks
  • teach AGENTS/Copilot review guidance to flag concrete architecture drift
  • start splitting commands.rs by moving parser/token helpers into commands/parser.rs with focused tests

Stack

Validation

  • ruby scripts/check-architecture-ratchets.rb
  • ruby scripts/check-docs-site.rb
  • cargo fmt --all -- --check
  • git diff --check pr-172-latest..HEAD

Copilot AI review requested due to automatic review settings May 11, 2026 23:15
@qodo-code-review

Copy link
Copy Markdown
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an “architecture drift ratchet” to keep oversized Rust modules from growing unintentionally, surfaces a few drift-related metrics in CI output, and starts splitting crates/calciforge/src/commands.rs by extracting command parsing/suggestion helpers into a dedicated submodule with unit tests.

Changes:

  • Introduces scripts/check-architecture-ratchets.rb to enforce per-file Rust line budgets and report counts of watched drift patterns.
  • Wires the ratchet script into the CI docs job.
  • Extracts command parsing + fuzzy suggestion helpers into crates/calciforge/src/commands/parser.rs and updates commands.rs to use it.
  • Updates AGENTS.md and Copilot/Rust review instructions to explicitly call out architecture drift patterns worth flagging.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/check-architecture-ratchets.rb New CI ratchet enforcing Rust module line budgets + reporting drift pattern counts.
crates/calciforge/src/commands/parser.rs New commands submodule for token/arg parsing and command suggestion, with tests.
crates/calciforge/src/commands.rs Wires in the new parser submodule and removes duplicated helper implementations.
AGENTS.md Adds contributor guidance about large-file budgets and architecture drift patterns.
.github/workflows/ci.yml Runs the architecture ratchet script as part of docs checks.
.github/instructions/rust.instructions.md Adds explicit review guidance around boundary hygiene and owned background work.
.github/copilot-instructions.md Elevates “architecture drift” in review priorities and documents the new ratchet tool.

Comment thread scripts/check-architecture-ratchets.rb
Comment thread crates/calciforge/src/commands/parser.rs
@bglusman bglusman force-pushed the codex/architecture-ratchets-stacked branch from 36698ac to fe1309c Compare May 12, 2026 02:32
@bglusman bglusman changed the base branch from issue-151-placeholder-main to main May 12, 2026 02:32
@bglusman bglusman merged commit e744bd9 into main May 12, 2026
24 checks passed
@bglusman bglusman deleted the codex/architecture-ratchets-stacked branch May 12, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants